package com.gaia.member.gaiatt.message;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.gaia.member.gaiatt.R;
import com.gaia.member.gaiatt.utils.ZhtUtils;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by zhangHaiTao on 2016/5/3.
 */
public class MessageHomeFragement extends Fragment {
    @Bind(R.id.iv_back_title_bar)
    ImageView ivBackToolBar;
    @Bind(R.id.tv_title_title_bar)
    TextView tvTitleToolBar;
    @Bind(R.id.ll_message)
    LinearLayout llMessage;
    @Bind(R.id.ll_follow_up_message)
    LinearLayout llFollowUpMessage;
    @Bind(R.id.ll_latest_activity)
    LinearLayout llLatestActivity;

    @Nullable


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_message_home, null);

        ButterKnife.bind(this, view);

        initView();
        return view;
    }

    private void initView() {
        ivBackToolBar.setVisibility(View.GONE);
        tvTitleToolBar.setText("消息");

        llMessage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ZhtUtils.gotoIntent(getActivity(), ListMessageActivity.class);
            }
        });

        llFollowUpMessage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ZhtUtils.gotoIntent(getActivity(), ListMessageActivity.class);
            }
        });

        llLatestActivity.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ZhtUtils.gotoIntent(getActivity(), ListMessageActivity.class);
            }
        });
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }
}
